package com.dddd.blog.bloguser;


import com.dddd.blog.blogcommon.utils.PasswordUtils;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.util.Assert;

@SpringBootTest
public class BlogUserTest03 {


    @Test
    public void testGeneratePwd(){
        String pwdMd5 = PasswordUtils.pwdMd5("1234", "test1234");
        System.out.println(pwdMd5);
    }

    @Test
    public void testIsPasswordCorrect(){
        String passwordMd5 = "cf1bf41e25f70e7941e4fa84ef8e29f7";

        Assert.isTrue(PasswordUtils.isCorrectPassword("123","test1234",passwordMd5),
                "密码不正确");

    }
}
